fix(desktop): add "Copy Image" to right-click context menu#1052
fix(desktop): add "Copy Image" to right-click context menu#1052GuilhermeVieiraDev wants to merge 1 commit intopingdotgg:mainfrom
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip CodeRabbit can scan for known vulnerabilities in your dependencies using OSV Scanner.OSV Scanner will automatically detect and report security vulnerabilities in your project's dependencies. No additional configuration is required. |
What Changed
Added a "Copy Image" option to the Electron right-click context menu when clicking on an image.
Why
The Electron context menu only showed Cut/Copy/Paste/Select All. There was no way to copy an image from the app, whether from the expanded image preview or the smaller image thumbnails.
UI Changes
Before:

On expanded image preview:
On image thumbnail:

After:

On expanded image preview:
On image thumbnail:

Checklist
Note
Add "Copy Image" to the desktop right-click context menu
In main.ts, the
context-menuevent handler increateWindownow injects a "Copy Image" menu item when right-clicking on an image. Selecting it callswebContents.copyImageAt(x, y)to copy the image to the clipboard.Macroscope summarized 5ae725c.